// pages/bookingregister/bookingregister.js
var app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    hiddenName:false,
    hiddenName1:true,
    hiddenName2:true,
    inputValue:null,
    table:[
      {
        name:"儿童专科",
        icon:'../image/jiantou.png'
    },
    {
        name:"儿童呼吸专科",
        icon:'../image/jiantou.png'
    },
    {
        name:"儿科哮喘",
        icon:'../image/jiantou.png'
    },
      {
        name:"小儿神经专科",
        icon:'../image/jiantou.png'
    },
      {
        name:"儿科肾脏免疫风湿",
        icon:'../image/jiantou.png'
    },
    {
        name:"小儿血液、肿瘤",
        icon:'../image/jiantou.png'
    },
    {
        name:"新生儿护理门诊",
        icon:'../image/jiantou.png'
    },
    {
        name:"高危儿随访、遗传代谢",
        icon:'../image/jiantou.png'
    },
    {
        name:"小儿血液、遗传代谢",
        icon:'../image/jiantou.png'
    },
    {
        name:"儿科消化专科",
        icon:'../image/jiantou.png'
    },
    {
        name:"儿童保健",
        icon:'../image/jiantou.png'
    },
    {
        name:"儿科内分泌专科",
        icon:'../image/jiantou.png'
    }
  ],
  // doctor
  doctorList:[
    {
      image:"../image/personal.png",
      name: "张秀",
      section:"儿科",
      position:"主任医师",
      more:"更多医生",
      icon: '../image/jiantou.png'
    },
    {
      image: "../image/personal.png",
      name: "张秀",
      section: "儿科",
      position: "主任医师",
      more: "更多医生",
      icon: '../image/jiantou.png'
    },
  ],
  // more
  more:[{
    more_doctor:"更多医生",
    icon: '../image/jiantou.png'
  }]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    wx.showModal({
      title: '温馨提示',
      showCancel:false,
      confirmText:'关闭',
			content: '【发热】(48小时内)患儿无需预约挂号,请到【请到急诊发热诊室就诊】。感谢您的支持配合,祝您及家人身体健康！',
			success: function(res) {
        console.log(res.confirm)
				if (res.confirm) {
				console.log('用户点击关闭')
				} 
			}
		})

  },
  handleInputChange(){
    this.setData({
      hiddenName:!this.data.hiddenName,
      hiddenName1:!this.data.hiddenName1,
      // hiddenName2:!this.data.hiddenName2
   })
  },
  //监控输入框
  watchPassWord(event){
    console.log(event.detail.value);
    this.setData({
      hiddenName2:false
   })
  },
  quxiao(){
    this.setData({
      hiddenName:false,
      hiddenName1:true,
      hiddenName2:true,
      'inputValue': ''
   })
  },
  //跳转科室预约
  onItemClick(e){
    var name = e.currentTarget.dataset.item.name
     wx.navigateTo({
       url: '../appointment/appointment?name=' +　name,
     })
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})